package com.cloudkinto.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 库区表
 * </p>
 *
 * @author long
 * @since 2024-11-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_storage_area")
public class StorageAreaDo extends Model<StorageAreaDo> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField(value = "wh_id", fill = FieldFill.INSERT)
    private Long whId;

    @TableField(value = "tenant_id", fill = FieldFill.INSERT)
    private Long tenantId;

    /**
     * 库区编码
     */
    @TableField("code")
    private String code;

    /**
     * 库区名称
     */
    @TableField("name")
    private String name;

    /**
     * 库区类型
     */
    @TableField("type")
    private Integer type;

    /**
     * 0正品区 1次品区
     */
    @TableField("main_type")
    private Boolean mainType;

    /**
     * 备注
     */
    @TableField("remark")
    private String remark;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
